<template>
	<div class="comment_form">
		<!-- <div class="push"></div> -->
		<div class="comment_form">
			<label  for="record" class="record iconfont">&#xe611;</label>
			<input type="file" accept="video/*" capture="camcorder" id="record" style="display:none">
			<input type="text" name="" placeholder="评论..." class="pl" v-myfocus>
			<label for="image" class="capture iconfont">&#xe60c;</label>
			<input type="file" id='image' accept="image/*" capture='camera' style="display:none" multiple>
		</div>
	</div>
</template>
<script type="text/javascript">
	export default {
		name:"commentform",
		data(){
			return {

			}
		},
		props:{
			commentsId:{
				type:Number,
				default:null 
			}
		},
		directives:{	//自定义指令，focus是指令的名字，inserted是他的钩子函数，当被绑定这个指令的元素被插入到父节点时进入该函数
			myfocus:{
				inserted: function (el,binding,vnode,oldVnode) {
					console.log(binding,vnode,oldVnode)
			      el.focus()
			    }
			}
		},
		mounted(){
			
		}
	}
</script>
<style type="text/css" lang="less" scoped>
div.push{
	height:35px;
}
.comment_form{
	width:100%;
	background-color:#FFF;
	position:fixed;
	bottom:0;
	left:0;
	text-align:center;
	.pl{
		padding:8px 6px;
		margin:4px 0;
		width:70%;
		outline-color:#25d619;
		border-radius:8px;
	}
	.iconfont{
		font-size:18px;
		margin:0 8px; 
	}
}
</style>